package com.battcn.platform.mapper.crow;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import com.battcn.platform.entity.crow.User;

/**
 * Created by CrowHawk on 17/10/12.
 */
@Mapper
public interface UserMapper {
    @Insert("replace into user (`name`,`gender`,`home_team`,`address`,`views`) values (#{name},#{gender},#{homeTeam},#{address},#{views})")
    void insert(User user);
    //获取用户的地域分布
    List<User> selectAllAddressesSort(Integer selectLimitNum);
    //获取用户的性别分布
    List<User> selectAllGender();
    //获取所有用户，并按照访问量排序
    List<User> selectAllUsersSortedByViews(Integer selectLimitNum);
}
